ELEMENTS

Editing
  • account_tree
  • bug_report

<optgroup>

<option> 요소를 그룹화하여 label 애트리뷰트로 차별하여 표시한다.

  • 콘텐츠 분류

    NONE

  • 허용된 부모 요소 또는 위치

    <SELECT>

  • 허용된 자식 요소

    SCRIPT SUPPORTING, <OPTION>

    0개 이상의 <option> 및 스크립트 지원(script- supporting) 요소

  • 태그 생략

    종료 태그 생략 가능

    <optgroup> 요소 바로 뒤에 다른 <optgroup> 요소 또는 <hr> 요소가 오거나 이후에 더 이상 콘텐츠가 없는 경우에는 종료 태그를 생략할 수 있다.

  • DOM Interface

    HTMLOptGroupElement

    [Exposed=Window]
    interface HTMLOptGroupElement : HTMLElement {
      [HTMLConstructor] constructor();
    
      [CEReactions] attribute boolean disabled;
      [CEReactions] attribute DOMString label;
    };

구문

마크업 형식
<select> <optgroup> <option></option> </optgroup <optgroup> <option></option> </optgroup
</select>
Example

애트리뷰트

disabled boolean attributes

요소를 비활성화한다.

About Boolean attributes

불리언(boolean) 값을 나타낸다. 예를 들어 다음 세 가지 값은 모두 참(true)이다.

<input disabled>, <input disabled="disabled">, <input disabled="">

이 요소에서의 특징

<optgroup> 요소의 모든 하위 <option> 요소가 해당된다.

label 

<option> 요소의 값에 대한 별칭이거나 <optgroup> 요소에서 표시되는 그룹 레이블을 나타낸다.

글로벌 애트리뷰트

일부 글로벌 애트리뷰트는 이 요소에서 사용되지 않을 수 있다.

글로벌 이벤트 핸들러

일부 글로벌 이벤트 핸들러는 이 요소에서 사용되지 않을 수 있다. 이벤트 등록은 자바스크립트 사용을 권장한다.

버전 명세

지원 웹브라우저